var
  n, p2, sum_plus, sum_minus: longint;

function EqualSigns(x, y: longint): boolean;
begin
  if (x>=0) and (y>=0) or (x<=0) and (y<=0)
  then
    EqualSigns := true
  else
    EqualSigns := false;
end;


begin
  read(n);
  p2 := 1;
  sum_plus := 1;
  sum_minus := 0;
  while sum_plus < n do begin
    p2 := - p2 * 2;
    if p2 > 0 then
      sum_plus := sum_plus + p2
    else
      sum_minus := sum_minus + p2;
  end;
  while n <> 0 do begin
    if not EqualSigns(n, p2) then begin
      write(0);
      if p2 > 0 then
        sum_plus := sum_plus - p2
      else
        sum_minus := sum_minus - p2;
      p2 := -p2 div 2;
    end;
    if n > 0 then begin
      if sum_plus - p2 >= n then
        write(0)
      else begin
        write(1);
        n := n - p2;
      end;
      sum_plus := sum_plus - p2;
    end else
    begin
      if abs(sum_minus - p2) >= abs(n) then
        write(0)
       else begin
         write(1);
         n := n - p2;
       end;
       sum_minus := sum_minus - p2;
    end;
    p2 := - p2 div 2;
  end;
  while p2<>0 do begin
    write(0);
    p2 := - p2 div 2;
  end;
  writeln;
end.
